﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<div class="modal-dialog x-modal-dialog" style="width:800px;">

  <div class="modal-content">

    <div class="modal-header x-breadcrumb no-bottom-border clearfix">

      <h2><i class="glyphicon glyphicon-fire"></i>&nbsp;&nbsp;<span>编辑门店&nbsp;-&nbsp;基本信息</span></h2>

      <button type="button" class="close" data-dismiss="modal">&times;</button>

    </div>

    <form class="form-horizontal" method="POST" action="${ctx.host}/sites/${site.id}" data-validate="true">
    
      <input type="hidden" name="_method" value="PATCH">
      <input type="hidden" name="siteId" value="${site.id }">
      
      <div class="modal-body">
        
        <div class="form-group x-form-group">
          <label class="col-xs-2 control-label">门店编号</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="code" value="${site.code}" class="form-control" data-validate="required">
          </div>
          <label class="col-xs-2 control-label">门店名称</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="name" value="${site.name}" class="form-control" data-validate="required">
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="col-xs-2 control-label">门店别名</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="alias" value="${site.alias}" class="form-control" data-validate="required">
          </div>
          <label class="control-label col-xs-2">门店电话</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="landline" value="${site.landline}" class="form-control" data-validate="required">
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="col-xs-2 control-label">所属城市</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="city" value="${site.city}" class="form-control" data-validate="required">
          </div>
          <label class="control-label col-xs-2">创建时间</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="createTime" value="<fmt:formatDate value="${site.createTime}" pattern="yyyy-MM-dd"/>" class="form-control" data-validate="required">
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="control-label col-xs-2">联系人姓名</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="contact.contactPerson" value="${site.contact.contactPerson}" class="form-control" data-validate="required">
          </div>
          <label class="control-label col-xs-2">联系人号码</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 30%">
            <input type="text" name="contact.contactPhone" value="${site.contact.contactPhone}" class="form-control" data-validate="required">
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="control-label col-xs-2">门店地址</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 60%">
            <input type="text" name="location.address" value="${site.location.address }" class="form-control" data-validate="required">
          </div>
        </div>
        
        <div class="form-group x-form-group">
          <label class="control-label col-xs-2">地址描述信息</label>
          <div class="pull-left col-xs-4 pull-left" style="width: 60%">
            <input type="text" name="location.addressDescription" value="${site.location.addressDescription}" class="form-control" data-validate="required">
          </div>
        </div>
        
      </div>

      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">取消</button>
      </div>
    </form>

  </div>

</div>
